using Unity.Entities;
using UnityEngine;

public class EnemyCounterAuthoring : MonoBehaviour
{
    public int enemyCounterInitialize;
    public class Baker : Baker<EnemyCounterAuthoring>
    {
        public override void Bake(EnemyCounterAuthoring authoring)
        {
            Entity entity = GetEntity(TransformUsageFlags.Dynamic);
            AddComponent(entity, new EnemyCounter
            {
                enemyCount = authoring.enemyCounterInitialize,
            });
        }
    }

}

public struct EnemyCounter : IComponentData
{
    public int enemyCount;
}
